﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Tools.Api.Http {

    /// <summary>
    /// 常用Cookie接口
    /// </summary>
    public interface ICookie {

        /// <summary>
        /// 设置响应的cookie
        /// </summary>
        /// <param name="ticketKeyName">票据COOKIE标识</param>
        /// <param name="dictionary">COOKIE细节</param>
        /// <param name="domian">cookie域</param>
        void SetResponseCookie(string ticketKeyName, IDictionary<string, string> dictionary, string domian);

        /// <summary>
        /// 查询请求的cookie
        /// </summary>
        /// <param name="ticketKeyName">票据COOKIE标识</param>
        /// <returns>cookie细节,如果不存在,dict数目为0</returns>
        IDictionary<string, string> GetRequestCookie(string ticketKeyName);

        /// <summary>
        /// 移除当前请求cookie
        /// </summary>
        /// <param name="ticketKeyName">票据COOKIE标识</param>
        /// <param name="domain">要溢出cookie的域</param>
        void RmoveCookie(string ticketKeyName, string domain);

    }
}
